/*************************************************************************
	> File Name: Adapter.h
	> Author: Joker
	> Mail: mahongtao@foxmail.com 
	> Created Time: 2020-09-21 22:06:41
 ************************************************************************/

#ifndef __ADAPTER_H__
#define __ADAPTER_H__

class Target
{
public:
    Target(){}
    virtual ~Target(){}

    virtual void Request() = 0;
};

//与被Adapt对象提供不兼容接口
class Adaptee
{
public:
    Adaptee(){}
    ~Adaptee(){}
    void SpecialRequest();
};

//进行Adapt的类，采用聚合原有接口类的方式
//也可考虑采用继承的方式
class Adapter
:public Target
{
public:
    Adapter(Adaptee * pAdaptee);
    virtual ~Adapter();

    virtual void Request();
private:
    Adaptee * _pAdaptee;
};

#endif
